package com.bupt.fmmall.service;

import com.bupt.fmmall.entity.ShoppingCart;
import com.bupt.fmmall.entity.ShoppingCartVO;
import com.bupt.fmmall.vo.ResultVO;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lyh
 * @since 2021-4-5
 */
public interface ShoppingCartService {

    //添加到购物车
    public boolean add_to_Cart(ShoppingCart cart);

    //1.根据用户id获取所有购物车中的项目
    public ResultVO findAllCartByUserId(String customeruserName);

    //根据购物车id获取某个购物车对象
    public ShoppingCart get_ShoppingCart_by_ShoppingCartId(int ShoppingCartId);

    //3.删除购物车的某个项目
    public ResultVO delete_CartItem(Integer itemId,String customeruserName);

    //删除所有
    public boolean delete_all(String customeruserName);

    //2.改商品数量
    public ResultVO set_ShoppingCartId_number(Integer itemId,String customeruserName,Integer itemNumber);

    //4.根据顾客名和商品id获取选定的购物车项
    public ResultVO findChoosenCart(String itemId,String customeruserName);
}